import {Component, Input} from '@angular/core';
import {NavController} from "ionic-angular";

@Component({
    selector: 'tabs',
    templateUrl: 'tabs.html'
})
export class TabsComponent {
    @Input('page') page:string;

    constructor(
        public navCtrl: NavController
    ) {
    }

    //跳转
    goPage(page){
        this.navCtrl.push(page).then(success=>{
            if(success !== true){//页面需要登录后跳转
                this.navCtrl.push('LoginPage');
            }
        })
    }

}
